<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
    <style>
      body {
        background: #060a1f;
        color: #fff;
        display: flex;
        justify-content: center;
        align-items: center;
        min-height:100vh;
      }
      .clock h2 {
        color: #fff;
        text-transform: uppercase;
        letter-spacing: 0.2em;
        text-align: center;
      }
      .time {
        display: flex;
        letter-spacing: 0.2em;
      }
      .time div {
        margin-left: 10px;
        -webkit-box-reflect: below 1px
          linear-gradient(transparent, #0004);
      }
      div span {
        width: 100px;
        height: 80px;
        background: #2196f3;
        text-transform: uppercase;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 3em;
        font-weight: 200;
      }
      div span:nth-child(2) {
        font-size: 0.2em;
        background:#127fd6;
      }
      .time div:last-child span {
        background: #ff006a;
      }
      div span:last-child {
        height: 30px;
        box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3);
      }
    </style>
  </head>
  <body>
    <div class="clock">
      <h2>time is now</h2>
      <div class="time">
        <div><span id="hours">00</span><span>hour</span></div>
        <div><span id="minutes">00</span><span>minutes</span></div>
        <div><span id="seconds">00</span><span>second</span></div>
      </div>
    </div>
    <script>
      function clock() {
        var hour_obj = document.getElementById("hours");
        var minutes_obj = document.getElementById("minutes");
        var second_obj = document.getElementById("seconds");
        var hour_num = new Date().getHours();
        var minute_num = new Date().getMinutes();
        var second_num = new Date().getSeconds();
        hour_obj.innerHTML = hour_num;
        minutes_obj.innerHTML = minute_num;
        second_obj.innerHTML = second_num;
      }

      setInterval(clock, 1000);
    </script>
  </body>
</html>
